<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<style>
            *{
                margin: 0;
                padding: 0;
            }
            .switch{
                appearance: none;
                width: 100px;
                height: 60px;
                background-color: #bfbfbf;
                border-radius: 60px;
                border: 2px solid rgba(0, 0, 0, .1);
                position: relative;
            }
            .switch::before{
                position: absolute;
                left: 0;
                top: 0;
                content: '';
                width: 55px;
                height: 55px;
                border-radius: 50%;
                background-color: #fff;
                transition: all .2s linear;
            }
            .switch:checked{
                background-color: #1677ff;
            }
            .switch:checked::before{
                left: calc(100% - 55px);
            }
		</style>
	</head>
	<body>
		<input type="checkbox" class="switch">
	</body>
</html>
